package com.kaili.db.service.impl;

import com.kaili.pojo.entity.HsEwbsStowageDetail;
import com.kaili.db.mapper.HsEwbsStowageDetailMapper;
import com.kaili.db.service.IHsEwbsStowageDetailService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author cgm
 * @since 2018-05-08
 */
@Service
@Transactional
public class HsEwbsStowageDetailServiceImpl extends ServiceImpl<HsEwbsStowageDetailMapper, HsEwbsStowageDetail> implements IHsEwbsStowageDetailService {

    @Override
    public boolean insertBatch(List<HsEwbsStowageDetail> list){
        baseMapper.insertBatch(list);
        return true;
    }

    @Override
    public int updateByOperationIdAndEwbNo(HsEwbsStowageDetail detailNew) {
        return baseMapper.updateByOperationIdAndEwbNo(detailNew);
    }

    public List<HsEwbsStowageDetail> queryEwbByStowage(Map<String, Object> map){
        return baseMapper.selectByMap(map);
    }
}
